<!-- extends 表明此页面继承自 base.html-->
{% extends "base.html" %}
{% load static %}
{% block title %}写文章{% endblock title %}
{% block content %}
<div class="container">
    <div class="row">
        <div class="col-12">
            <br>
            <form method="post" action=".">
                {% csrf_token %}
                <div class="form-group">
                    <label for="title">文章标题</label>
                    <input type="text" class="form-control" id="title" name="title">
                </div>
                <div class="form-group">
                    <label for="column">栏目</label>
                    <select class="form-control" id="column" name="column">
                        <option vlaue="none">请选择栏目..</option>
                        {% for column in columns %}
                        <option value = "{{ column.id }}">{{column}}</option>
                        {% endfor %}
                    </select>
                </div>
                <div class="form-group">
                    <label for="body">文章正文</label>
                    <textarea type="text" class="form-control" id="body" name="body" rows="12"></textarea>
                </div>
                <button type="submit" class="btn btn-primary">完成</button>
            </form>
        </div>
    </div>
</div>
{% endblock content %}